
#ifndef __W35T51NW_H__
#define __W35T51NW_H__

#define W35T51NW_FLASH_SIZE     (16 * 1024 * 1024 * 1)
#define W35T51NW_BLOCK_SIZE     (32 * 1024 * 1)
#define W35T51NW_SECTOR_SIZE    (4096 * 1)
#define W35T51NW_PAGE_SIZE      (256 * 1)

#define W35T51NW_AMF            (0b1)

extern int W35T51NWIE_Read(uint8_t *pdata, uint32_t _addr, uint32_t _sz);
extern int W35T51NW_Write(uint8_t *pData, uint32_t WriteAddr, uint32_t Size);
extern int W35T51NWIE_STRMemoryMappedMode(void);
extern int W35T51NWIE_ReadCfgReg(uint8_t *cfgreg);
extern int W35T51NWIE_EraseChip(void);
extern int W35T51NWIE_EraseBlock32K(uint32_t _addr);
extern void W35T51NWIE_Reset(void);
extern void W35T51NWIE_ReadID(uint8_t *id);
extern int W35T51NWIE_ReadFlagReg(uint8_t *flagreg);

extern int W35T51NWIE_Enter4ByteAddr(void);
extern int W35T51NWIE_STRMemoryMappedMode4B(void);
extern int W35T51NWIE_EraseSector4K4B(uint32_t _addr);
extern int W35T51NWIE_EraseBlock32K4B(uint32_t _addr);
extern int W35T51NWIE_Read4B(uint8_t *pdata, uint32_t _addr, uint32_t _sz);
extern int W35T51NW_Write4B(uint8_t *pData, uint32_t WriteAddr, uint32_t Size);

#endif
